export function setValue(key,value){
    localStorage.setItem(key,value)
}

export function setObject(key,data){

    localStorage.setItem(key,JSON.stringify(data))
}

export function getObject(key){
    try {
        return JSON.parse(localStorage.getItem(key))
    }catch (e) {
        return ""
    }
}

export function getValue(key){
    return localStorage.getItem(key)
}

export function clear(){
    localStorage.clear()
    sessionStorage.clear()
}


export function setSessionValue(key,value){
    sessionStorage.setItem(key,value)
}

export function setLocalValue(key,value){
    localStorage.setItem(key,value)
}


export function setSessionObject(key,data){

    sessionStorage.setItem(key,JSON.stringify(data))
}



export function setLocalObject(key,data){

    localStorage.setItem(key,JSON.stringify(data))
}

export function getSessionObject(key){
    try {
        return JSON.parse(sessionStorage.getItem(key))
    }catch (e) {
        return ""
    }
}

export function getLocalObject(key){
    try {
        return JSON.parse(localStorage.getItem(key))
    }catch (e) {
        return ""
    }
}

export function getSessionValue(key){
    return sessionStorage.getItem(key)
}


export function getLocalValue(key){
    return localStorage.getItem(key)
}
